Re: VC and RRBench


[ Follow Ups ] [ Post Followup ] [ Björn's 3D-World - Developer's Board ]

Posted by Jeff C from dial029.w-link.net (206.98.114.58)on March 07, 1998 at 15:43:12:

In Reply to: VC and RRBench posted by Jogi on March 07, 1998 at 07:40:45:

>#define FLTOIFIX(f) ( (v_u32)( ((float)(f)) * 65536.0) )

well, I am pretty sure Rendition has thought of these things:
65536 = 2**16 or 000001 << 16
but you can't shift floats so if you don't care abou accuracy, you could

#define FLTOIFIX(f) ( ((vu_32)f) << 16 )
This will only work if f is over a large set of numbers.
i.e. if 0 <= f <= 1, the this wouldn't work at all.
and remember, you are throwing away a lot of info here.
I would recommend NOT doing this.

The only thing I can think of is to maybe check out the MMX instruction set.
I don't know much about it, but I know it operates on vectors, so
if you had a bunch of floats, maybe you could all convert them at one time.

Maybe someone who has access to the MMX instruction set books could tell us
more about this.

(I suspect that MMX operates only on integer, though)

Like Chris says, don't use the macros at the back of the redline manual because
I would imagine a lot of GLide games throw the FPU into low precision mode.

Maybe the DLL should check to see if the FPU is in low precision mode, and
work around that. I would imagine that the first macro above would be faster
if the fpu were in low precision mode.


Follow Ups:



Post a Followup

Name:
E-Mail:

Subject:

Comments:

Optional Link URL:
Link Title:
Optional Image URL:


[ Follow Ups ] [ Post Followup ] [ Björn's 3D-World - Developer's Board ]